<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>头部</title>
    <!--<link rel="stylesheet" href="css/bootstrap-min.css">-->
    <link rel="stylesheet" href="css/header.css">
</head>
<body>
<nav class="navbar navbar-default">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header row">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                    data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#"><img src="img/logo.gif" alt=""></a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li><a href="index.html?id=0" class="header-active">首页</a></li>
                <li><a href="culture.html?id=1">企业文化</a></li>
                <li><a href="delicacy.html?id=2">美味西点</a></li>
                <li><a href="glory.html?id=3">团队荣耀</a></li>
                <li><a href="contact.html?id=4">联系我们</a></li>
            </ul>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>
<!--<script src="js/jquery-1.12.4.min.js"></script>-->
<!--<script src="js/bootstrap.min.js"></script>-->
<script>
    $('.navbar-nav li a').click(function () {
        $(this).addClass('header-active').parent().siblings().children().removeClass('header-active');
    })
    $(function () {
        let id=location.search.substr(4,1);


        $(".navbar-nav li a").eq(id).addClass("header-active").parent().siblings().children().removeClass("header-active");
    })
</script>
</body>
</html>